package com.yue.spring.sourcecode;

import com.yue.spring.sourcecode.bean.Message;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

/**
 * 功能描述: TODO <br/>
 * 创建时间: 2016/8/8<br/>
 *
 * @author QiuYang
 */
public class SimpleBeanFactory {
    public static void main(String[] args) {
        ClassPathResource resource = new ClassPathResource("applicationContext.xml");
        BeanFactory beanFactory = new XmlBeanFactory(resource);
        Message message = beanFactory.getBean("message", Message.class);
        message.printMessage();
    }
}
